package com.geek.factory.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 增值税发票信息
 * </p>
 *
 * @author author
 * @since 2025-06-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_invoice")
@ApiModel(value="TInvoice对象", description="增值税发票信息")
public class Invoice implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "发票代码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "发票号码")
    @TableField("number")
    private String number;

    @ApiModelProperty(value = "开票日期")
    @TableField("date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate date;

    @ApiModelProperty(value = "校验码")
    @TableField("check_code")
    private String checkCode;

    @ApiModelProperty(value = "机器编号")
    @TableField("machine_code")
    private String machineCode;

    @ApiModelProperty(value = "购方名称")
    @TableField("buyer_name")
    private String buyerName;

    @ApiModelProperty(value = "购方税号")
    @TableField("buyer_tax_code")
    private String buyerTaxCode;

    @ApiModelProperty(value = "购方地址电话")
    @TableField("buyer_address_phone")
    private String buyerAddressPhone;

    @ApiModelProperty(value = "购方开户行及银行账号")
    @TableField("buyer_bank_account")
    private String buyerBankAccount;

    @ApiModelProperty(value = "销方名称")
    @TableField("seller_name")
    private String sellerName;

    @ApiModelProperty(value = "销方税号")
    @TableField("seller_tax_code")
    private String sellerTaxCode;

    @ApiModelProperty(value = "销方地址电话")
    @TableField("seller_address_phone")
    private String sellerAddressPhone;

    @ApiModelProperty(value = "销方开户行及银行账号")
    @TableField("seller_bank_account")
    private String sellerBankAccount;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "票种类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "收款人")
    @TableField("receiptor")
    private String receiptor;

    @ApiModelProperty(value = "开票人")
    @TableField("issuer")
    private String issuer;

    @ApiModelProperty(value = "复核人")
    @TableField("reviewer")
    private String reviewer;

    @ApiModelProperty(value = "关联发票详细表ID")
    @TableField("invoice_item_id")
    private Long invoiceItemId;

    @ApiModelProperty(value = "详细发票类型")
    @TableField("type_org")
    private String typeOrg;

    @ApiModelProperty(value = "价税合计大写")
    @TableField("amount_in_words")
    private String amountInWords;

    @ApiModelProperty(value = "价税合计小写")
    @TableField("amount_in_figuers")
    private String amountInFiguers;

    @ApiModelProperty(value = "密码区")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "图片地址")
    @TableField("url")
    private String url;

@ApiModelProperty(value = "发票状态 (0:未开票, 1:申请中, 2:开票中, 3:已开票, 4:开票失败)")
@TableField("status")
private Integer status;
}